3.7 \(\int \frac{\sec ^3(x)}{a+a \csc (x)} \, dx\)

Optimal. Leaf size=46 \[ \frac{\sec ^4(x)}{4 a}+\frac{\tanh ^{-1}(\sin (x))}{8 a}-\frac{\tan (x) \sec ^3(x)}{4 a}+\frac{\tan (x) \sec (x)}{8 a} \]

[Out]

ArcTanh[Sin[x]]/(8*a) + Sec[x]^4/(4*a) + (Sec[x]*Tan[x])/(8*a) - (Sec[x]^3*Tan[x])/(4*a)

________________________________________________________________________________________

Rubi [A]  time = 0.126852, antiderivative size = 46, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.538, Rules used = {3872, 2835, 2606, 30, 2611, 3768, 3770} \[ \frac{\sec ^4(x)}{4 a}+\frac{\tanh ^{-1}(\sin (x))}{8 a}-\frac{\tan (x) \sec ^3(x)}{4 a}+\frac{\tan (x) \sec (x)}{8 a} \]

Antiderivative was successfully verified.

[In]

Int[Sec[x]^3/(a + a*Csc[x]),x]

[Out]

ArcTanh[Sin[x]]/(8*a) + Sec[x]^4/(4*a) + (Sec[x]*Tan[x])/(8*a) - (Sec[x]^3*Tan[x])/(4*a)

Rule 3872

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[((g*C
os[e + f*x])^p*(b + a*Sin[e + f*x])^m)/Sin[e + f*x]^m, x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rule 2835

Int[(cos[(e_.) + (f_.)*(x_)]^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.))/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]
), x_Symbol] :> Dist[1/a, Int[Cos[e + f*x]^(p - 2)*(d*Sin[e + f*x])^n, x], x] - Dist[1/(b*d), Int[Cos[e + f*x]
^(p - 2)*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n, p}, x] && IntegerQ[(p - 1)/2] && EqQ[a^2
 - b^2, 0] && IntegerQ[n] && (LtQ[0, n, (p + 1)/2] || (LeQ[p, -n] && LtQ[-n, 2*p - 3]) || (GtQ[n, 0] && LeQ[n,
 -p]))

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2611

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(a*Sec[e
+ f*x])^m*(b*Tan[e + f*x])^(n - 1))/(f*(m + n - 1)), x] - Dist[(b^2*(n - 1))/(m + n - 1), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \frac{\sec ^3(x)}{a+a \csc (x)} \, dx &=\int \frac{\sec ^2(x) \tan (x)}{a+a \sin (x)} \, dx\\ &=\frac{\int \sec ^4(x) \tan (x) \, dx}{a}-\frac{\int \sec ^3(x) \tan ^2(x) \, dx}{a}\\ &=-\frac{\sec ^3(x) \tan (x)}{4 a}+\frac{\int \sec ^3(x) \, dx}{4 a}+\frac{\operatorname{Subst}\left (\int x^3 \, dx,x,\sec (x)\right )}{a}\\ &=\frac{\sec ^4(x)}{4 a}+\frac{\sec (x) \tan (x)}{8 a}-\frac{\sec ^3(x) \tan (x)}{4 a}+\frac{\int \sec (x) \, dx}{8 a}\\ &=\frac{\tanh ^{-1}(\sin (x))}{8 a}+\frac{\sec ^4(x)}{4 a}+\frac{\sec (x) \tan (x)}{8 a}-\frac{\sec ^3(x) \tan (x)}{4 a}\\ \end{align*}

Mathematica [A]  time = 0.049822, size = 25, normalized size = 0.54 \[ \frac{\frac{1}{1-\sin (x)}+\frac{1}{(\sin (x)+1)^2}+\tanh ^{-1}(\sin (x))}{8 a} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[x]^3/(a + a*Csc[x]),x]

[Out]

(ArcTanh[Sin[x]] + (1 - Sin[x])^(-1) + (1 + Sin[x])^(-2))/(8*a)

________________________________________________________________________________________

Maple [A]  time = 0.048, size = 44, normalized size = 1. \begin{align*}{\frac{1}{8\,a \left ( \sin \left ( x \right ) +1 \right ) ^{2}}}+{\frac{\ln \left ( \sin \left ( x \right ) +1 \right ) }{16\,a}}-{\frac{1}{8\,a \left ( \sin \left ( x \right ) -1 \right ) }}-{\frac{\ln \left ( \sin \left ( x \right ) -1 \right ) }{16\,a}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(x)^3/(a+a*csc(x)),x)

[Out]

1/8/a/(sin(x)+1)^2+1/16*ln(sin(x)+1)/a-1/8/a/(sin(x)-1)-1/16/a*ln(sin(x)-1)

________________________________________________________________________________________

Maxima [A]  time = 0.952153, size = 73, normalized size = 1.59 \begin{align*} -\frac{\sin \left (x\right )^{2} + \sin \left (x\right ) + 2}{8 \,{\left (a \sin \left (x\right )^{3} + a \sin \left (x\right )^{2} - a \sin \left (x\right ) - a\right )}} + \frac{\log \left (\sin \left (x\right ) + 1\right )}{16 \, a} - \frac{\log \left (\sin \left (x\right ) - 1\right )}{16 \, a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^3/(a+a*csc(x)),x, algorithm="maxima")

[Out]

-1/8*(sin(x)^2 + sin(x) + 2)/(a*sin(x)^3 + a*sin(x)^2 - a*sin(x) - a) + 1/16*log(sin(x) + 1)/a - 1/16*log(sin(
x) - 1)/a

________________________________________________________________________________________

Fricas [A]  time = 0.49542, size = 220, normalized size = 4.78 \begin{align*} -\frac{2 \, \cos \left (x\right )^{2} -{\left (\cos \left (x\right )^{2} \sin \left (x\right ) + \cos \left (x\right )^{2}\right )} \log \left (\sin \left (x\right ) + 1\right ) +{\left (\cos \left (x\right )^{2} \sin \left (x\right ) + \cos \left (x\right )^{2}\right )} \log \left (-\sin \left (x\right ) + 1\right ) - 2 \, \sin \left (x\right ) - 6}{16 \,{\left (a \cos \left (x\right )^{2} \sin \left (x\right ) + a \cos \left (x\right )^{2}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^3/(a+a*csc(x)),x, algorithm="fricas")

[Out]

-1/16*(2*cos(x)^2 - (cos(x)^2*sin(x) + cos(x)^2)*log(sin(x) + 1) + (cos(x)^2*sin(x) + cos(x)^2)*log(-sin(x) +
1) - 2*sin(x) - 6)/(a*cos(x)^2*sin(x) + a*cos(x)^2)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\sec ^{3}{\left (x \right )}}{\csc{\left (x \right )} + 1}\, dx}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)**3/(a+a*csc(x)),x)

[Out]

Integral(sec(x)**3/(csc(x) + 1), x)/a

________________________________________________________________________________________

Giac [A]  time = 1.38791, size = 65, normalized size = 1.41 \begin{align*} \frac{\log \left (\sin \left (x\right ) + 1\right )}{16 \, a} - \frac{\log \left (-\sin \left (x\right ) + 1\right )}{16 \, a} - \frac{\sin \left (x\right )^{2} + \sin \left (x\right ) + 2}{8 \, a{\left (\sin \left (x\right ) + 1\right )}^{2}{\left (\sin \left (x\right ) - 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^3/(a+a*csc(x)),x, algorithm="giac")

[Out]

1/16*log(sin(x) + 1)/a - 1/16*log(-sin(x) + 1)/a - 1/8*(sin(x)^2 + sin(x) + 2)/(a*(sin(x) + 1)^2*(sin(x) - 1))